Questions
1 of 17
1Design a semantic search system that must support 500 million documents with sub-100ms p99 latency. What are the key architectural decisions?
2How would you plan capacity (RAM, disk, CPU, node count) for a collection of a given size, vector dimensionality, and expected QPS?
3What architectural changes would you make to support near-real-time search over data that changes thousands of times per second (e.g., a live feed)?
4How would you design a system that needs to support both 'search the last 24 hours' and 'search all history' with very different latency expectations?
5What role does caching play in a Qdrant-backed search system, and at what layers would you introduce it?
6How would you decide the initial number of shards for a new collection when the eventual data size is uncertain?
7What is the relationship between shard count and query fan-out cost, and why doesn't 'more shards' always mean 'faster'?
8How many replicas would you configure for a shard serving a mission-critical, read-heavy workload, and what does each additional replica cost you?
9What operational steps are involved in adding a new node to an existing Qdrant cluster and rebalancing shards onto it?
10How does Qdrant's architecture and target use case differ from Pinecone's as a fully managed, closed-source vector database?
11When would you choose pgvector inside an existing Postgres database over a dedicated vector database like Qdrant?
12What distinguishes Qdrant from Weaviate and Milvus at a conceptual level, and what would make you choose one over the others for a given project?
13Under what circumstances would a team be justified in NOT using a vector database at all, and instead using brute-force search or a traditional search engine?
14What is your target Recovery Point Objective (RPO) and Recovery Time Objective (RTO) for a Qdrant deployment, and how do snapshot frequency and replication factor influence each?
15How would you design a disaster-recovery strategy that survives the loss of an entire cloud region?
16What is the operational difference between a rolling upgrade of a replicated cluster and an in-place upgrade of a single-node deployment?
17How would you validate that a newly restored cluster from snapshots is actually healthy and serving correct results before routing production traffic to it?
01 / 17

Design a semantic search system that must support 500 million documents with sub-100ms p99 latency. What are the key architectural decisions?

Quantization, on-disk storage, sharding, replication, and caching at the right layers

The first decision is storage layout, because 500M documents at 768 dimensions of float32 is roughly 1.5 TB of raw vectors before any index. That will not fit in a single node's RAM at reasonable cost, and even if it did, the HNSW graph would add another 80-160 GB on top. The right answer is a hybrid: keep quantized vectors resident in RAM for traversal, keep the full-precision vectors on disk for rescoring, and put the HNSW graph on disk with inline quantized vectors to halve the I/O per traversal step. This combination makes sub-100ms p99 achievable without a huge RAM bill. The second decision is sharding: split the collection across enough shards that each shard fits comfortably on a node and each node can serve its share of the QPS. For 500M documents, 8-16 shards per replica set is a reasonable starting point, but the exact count depends on the query pattern and whether queries can be routed to a single shard via a shard key. The third decision is replication: for a mission-critical system, replication_factor=2 or 3 to survive a node failure without an outage. The fourth decision is caching: embedding cache at the application layer, result cache for repeated queries, and the OS page cache for the hot portion of the on-disk data. The fifth decision is the query path: use a two-stage pipeline with a cheap first-stage retriever and a reranker over a small candidate set.

The mechanism that lets this hit sub-100ms p99 is that each stage has a bounded cost. Quantized ANN traversal touches only the small quantized vectors, so it is memory-bandwidth-bound rather than disk-bound, and the graph is traversed in microseconds per hop. Rescoring touches only the top ~100 candidates with full-precision vectors, so the disk I/O is bounded and mostly cached. Sharding parallelizes the traversal across nodes, so the per-shard latency is a fraction of the total work, and the coordinator merges the per-shard top-k. Replication lets reads be distributed across replicas, which increases effective throughput and reduces the per-replica load. The p99 is dominated by the slowest shard and by the tail of the page-cache miss distribution, so the design must ensure that the working set fits in cache and that no single shard is a hotspot. The common failure mode is to underestimate the graph overhead and the payload index footprint, which pushes the working set out of cache and causes p99 spikes. Another common failure is to fan out queries to every shard on every request, which makes the coordinator and the slowest shard the bottleneck.

  1. 1

    Storage: binary or scalar quantization in RAM + full-precision vectors on disk + on-disk HNSW with inline quantized vectors.

  2. 2

    Sharding: 8-16 shards per replica set for 500M docs, sized so each shard fits on a node and serves its share of QPS.

  3. 3

    Replication: replication_factor=2 or 3 for availability and read scaling.

  4. 4

    Query path: two-stage pipeline - fast quantized ANN then reranker over a small candidate set.

  5. 5

    Caching: embedding cache, query-result cache for repeated queries, OS page cache for hot data.

  6. 6

    Hardware: NVMe for the on-disk data, enough RAM for the quantized vectors plus the hot portion of the graph.

  7. 7

    Filtering: payload indexes for the filterable fields, applied during traversal, with ef raised for selective filters.

  8. 8

    Observability: per-shard latency, page-cache hit rate, optimizer activity, and recall against ground truth.

The trade-offs are between recall and latency (quantization and ef), cost and latency (RAM vs disk), and availability and cost (replication). The common mistakes are: (1) sizing RAM by raw vector bytes only, forgetting the graph, payload indexes, and quantized vectors; (2) not planning the shard count generously up front, since sharding is a heavier operation than adding replicas; (3) forgetting that the p99 is bounded by the slowest shard, so a single hot shard can dominate the tail; (4) not testing the whole pipeline end-to-end under realistic load, so the benchmark is optimistic; (5) assuming that more shards always means faster, when at high shard counts the coordinator merge cost dominates. Version note: on-disk HNSW, inline storage, and the newer quantization schemes are recent additions to Qdrant and have evolved across releases. Verify the availability of these features on your version and benchmark the configuration with your data before committing to a design.

javascript

Version-dependent: the on_disk flags, inline storage, binary quantization, and the optimizer thresholds that control disk placement have all changed across Qdrant releases. The exact availability of these features and the defaults differ. Benchmark the design on your version with your data and your query distribution before committing, and re-benchmark after upgrades.

Difficulty: 9/10
Topics: Large-Scale Design, Quantization, Sharding, Latency Tuning

Scenario Questions

0-2 years experience
  1. 1

    You have 500M documents and a 100ms p99 SLO. Explain the first architectural decision you would make and why.

  2. 2

    A teammate proposes keeping all vectors in RAM. Explain why that is impractical at this scale and what the alternative is.

2-5 years experience
  1. 1

    You design the collection with binary quantization and the p99 is 150ms. Walk through the diagnosis and the changes you would make to hit 100ms.

  2. 2

    You need to choose between 8 and 32 shards. Describe the trade-off and how you would validate the choice with a benchmark.

5-8 years experience
  1. 1

    Design the full architecture for this system, including the ingestion pipeline, the collection configuration, the query pipeline, and the operational monitoring.

  2. 2

    You need to support both a fast endpoint (top-10, 50ms p99) and a high-quality endpoint (reranked, 200ms p99) on the same collection. Describe the design.

8+ years experience
  1. 1

    Derive the RAM, disk, CPU, and node count for this workload as a function of the parameters, and identify the assumptions that dominate the cost.

  2. 2

    The workload grows to 5B documents over two years. Describe the scaling roadmap and the points at which the architecture must change.

Follow-up Questions

  • How would you decide between 8, 16, and 32 shards for this workload, and what would you measure to validate the choice?
  • If the p99 is dominated by a single hot shard, what would you do to rebalance it without downtime?